/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.pf;

import com.plian.Tools.pagedata.PageData;
import com.plian.system.dto.pf.BaseWelfareExpendDTO;
import com.plian.system.entity.pf.BaseWelfareExpend;
import com.plian.system.entity.pf.WelfareExpend;
import com.plian.system.entity.pm.propertyinformation.PropertyTime;
import com.plian.system.model.ListResult;
import com.plian.system.model.ObjResult;
import com.plian.system.model.R;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.mybatis.support.Query;
import com.plian.system.vo.pf.BaseWelfareExpendVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 服务类
 *
 * @author
 * @since 2019-09-27
 */
public interface IBaseWelfareExpendService extends BaseService<BaseWelfareExpend> {

    /**
     * 每月只能填写一次
     * @param baseWelfareExpend
     * @return
     */
    String checkMonth(BaseWelfareExpend baseWelfareExpend);


    /**
     * 保存 包含子表
     * @param baseWelfareExpend
     * @return
     */
    boolean submit(BaseWelfareExpend baseWelfareExpend);

    /**
     * 获取detail obj对象
     * @param baseWelfareExpendVO
     * @return
     */
    R<BaseWelfareExpendVO> getDetailObj(BaseWelfareExpendVO baseWelfareExpendVO);

    /**
     * 获取上月已填报数据
     * @param fillingUnitId
     * @param fillingMonth
     * @return
     */
    List<WelfareExpend> getLastMonthObj(String fillingUnitId, String fillingMonth);

    /**
     * 职工福利费支出明细表-统计用(  年度)
     * @param baseWelfareExpendDTO
     * @return
     */
//    ReportReturnVO yearStatistics(BaseWelfareExpendDTO baseWelfareExpendDTO);

    /**
     * 填报树
     * @param baseWelfareExpend
     * @return
     */
    ObjResult tree(BaseWelfareExpend baseWelfareExpend);

//    /**TODO DEL
//     * 获取下级企业汇总数据
//     * @param baseWelfareExpend
//     * @return
//     */
//    ObjResult getSummaryObj(BaseWelfareExpend baseWelfareExpend);

    /**
     * 获取tree列表页
     * @param query
     * @return
     */
    ListResult<PageData> treeList(Query query);

    /**
     * 职工福利费支出明细主表填报树 新增
     * @param baseWelfareExpend
     * @return
     */
    ObjResult addTree(BaseWelfareExpend baseWelfareExpend);

    /**
     * 获取下级已填报数据
     * @param baseWelfareExpend
     * @return
     */
    ObjResult childList(BaseWelfareExpend baseWelfareExpend);

    /**
     * 根据主表id 获取合计数据
     * @param baseWelfareExpend
     * @return
     */
    ObjResult childSummary(BaseWelfareExpend baseWelfareExpend);

    /**
     * 合计数据来源
     * @param baseWelfareExpendDTO
     * @return
     */
    ObjResult summaryDetail(BaseWelfareExpendDTO baseWelfareExpendDTO);

    /**
     * 导出
     * @param baseWelfareExpendVO
     * @param response
     */
    void exportExcel(BaseWelfareExpendVO baseWelfareExpendVO, HttpServletResponse response) ;

    /**
     * findWelfareListByDateCreate
     * @param propertyTime
     * @return
     */
    List<PageData> findWelfareListByDateCreate(PropertyTime propertyTime) ;


}
